﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BigInteger
{
    class Integer
    {
        private DigitList digits;
        public int Sign { get; set; }

        public Integer(int value)
        {
            Sign = value >= 0 ? 1 : -1;
            digits = new DigitList(Math.Abs(value));
        }

        public Integer(string s)
        {
            var value = int.Parse(s);
            Sign = value >= 0 ? 1 : -1;
            digits = new DigitList(Math.Abs(value));
        }
        
        public override String ToString()
        {
            var result = String.Format("{0}{1}", Sign == -1 ? "-" : "+", digits.ToString());
            return result;
        }

        internal Integer Power(int exponent)
        {
            throw new NotImplementedException();
        }
    }
}
